package com.yc.web.feign;

import com.yc.damai.dto.Result;
import com.yc.damai.entity.DmProduct;
import com.yc.damai.entity.DmPromotion;
import com.yc.damai.entity.DmUser;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @author navy
 * @company 源辰信息
 * @date 2024/9/24
 * @email haijunzhou@hnit.edu.cn
 */
@FeignClient(value = "damai-other", fallback = OtherActionImpl.class)
public interface OtherAction {

    @RequestMapping("other")
    String other();

    @RequestMapping("dmProduct/queryHots")
    List<DmProduct> queryHots();

    @RequestMapping("hello")
    String hello(@RequestParam String name);

    @RequestMapping("add")
    int add(@RequestParam int a,@RequestParam int b);

    @RequestMapping("age/{num}")
    String age(@PathVariable int num);

    @RequestMapping("resetPwd")
    DmUser resetPwd(@RequestBody DmUser user,
                    @RequestParam String pwd,
                    @RequestParam String repwd);

    @RequestMapping("dmPromotion/getNoBegin")
    DmPromotion getNoBegin();

    @RequestMapping("dmPromotion/begin")
    Result begin(@RequestParam int pmid);

    @RequestMapping("dmPromotion/end")
    Result end(@RequestBody DmPromotion dmPromotion);

}
